using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_project_report"), DataContract]
    public class ProjectReport
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BgmProjRptId", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("bgm_proj_rpt_seq", TypeName="int")]
        public int ProjRptId { get; set; }

		[DataMember, Display(Name = "Descr", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("descr", TypeName="ntext")]
        public string Descr { get; set; }

		[ForeignKey("BgmProjExp")]
		[DataMember, Display(Name = "BgmProjExpId", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("bgm_proj_exp_seq", TypeName="int")]
        public Nullable<int> ProjExpId { get; set; }

        //[ForeignKey("BgmRec")]
        //[DataMember, Display(Name = "BgmRecId", ResourceType = typeof(Resources.ProjectReportResource))]
        //public Nullable<int> BgmRecId { get; set; }

        //[ForeignKey("BgmTransFrom")]
        //[DataMember, Display(Name = "BgmTransFromId", ResourceType = typeof(Resources.ProjectReportResource))]
        //[Column("bgm_trans_from_seq")]
        //public Nullable<int> TransFromId { get; set; }

        //[ForeignKey("BgmTransTo")]
        //[DataMember, Display(Name = "BgmTransToId", ResourceType = typeof(Resources.ProjectReportResource))]
        //[Column("bgm_trans_to_seq")]
        //public Nullable<int> TransToId { get; set; }

        //[ForeignKey("IcmPprItem")]
        //[DataMember, Display(Name = "IcmPprItemId", ResourceType = typeof(Resources.ProjectReportResource))]
        //[Column("PprItemId")]
        //public Nullable<int> PprItemId { get; set; }

        //[ForeignKey("IcmPrItem")]
        //[DataMember, Display(Name = "IcmPrItemId", ResourceType = typeof(Resources.ProjectReportResource))]
        //[Column("PrItemId")]
        //public Nullable<int> PrItemId { get; set; }

        //[ForeignKey("IcmPoItem")]
        //[DataMember, Display(Name = "IcmPoItemId", ResourceType = typeof(Resources.ProjectReportResource))]
        //[Column("PoItemId")]
        //public Nullable<int> PoItemId { get; set; }

        //[ForeignKey("IcmDnItem")]
        //[DataMember, Display(Name = "IcmDnItemId", ResourceType = typeof(Resources.ProjectReportResource))]
        //[Column("DnItemId")]
        //public Nullable<int> DnItemId { get; set; }

		[ForeignKey("BgmProjOperExp")]
		[DataMember, Display(Name = "BgmProjOperExpId", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("bgm_proj_oper_exp_seq", TypeName="int")]
        public Nullable<int> ProjOperExpId { get; set; }

		[DataMember, Display(Name = "UsedAmount", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("used_amount", TypeName="decimal")]
        public Nullable<decimal> UsedAmount { get; set; }

		[DataMember, Display(Name = "CalAmount", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("cal_amount", TypeName="decimal")]
        public Nullable<decimal> CalAmount { get; set; }

		[DataMember, Display(Name = "RptType", ResourceType = typeof(Resources.ProjectReportResource))]
		[Column("rpt_type", TypeName="int")]
        public Nullable<int> RptType { get; set; }

        [DataMember]
		public virtual ProjectExpense BgmProjExp { get; set; }

        //[DataMember]
        //public virtual Receive BgmRec { get; set; }

        //[DataMember]
        //public virtual TransferFrom BgmTransFrom { get; set; }

        //[DataMember]
        //public virtual BgmTransTo BgmTransTo { get; set; }

        //[DataMember]
        //public virtual ICM.PrePurchaseRequestItem IcmPprItem { get; set; }

        //[DataMember]
        //public virtual ICM.PurchaseRequestItem IcmPrItem { get; set; }

        //[DataMember]
        //public virtual ICM.PurchaseOrderItem IcmPoItem { get; set; }

        //[DataMember]
        //public virtual ICM.DeliveryNoteItem IcmDnItem { get; set; }

        [DataMember]
		public virtual ProjectOperationExpense BgmProjOperExp { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}